﻿@using Projectmanagement.Models
@{
    ViewBag.Title = "Chamber";
}
@(Html.Telerik().Grid<_Chamber>()
                    .Name("Chamber")
    .DataKeys(keys => { keys.Add(item => item.ID); })
    .ToolBar(toolBar => toolBar.Template(
                @<text> 会议厅表： <a class="t-button t-grid-add" href="/Chamber?Chamber-mode=insert">新增记录</a>
</text>
                ))
        .DataBinding(dataBinding =>
        {
            dataBinding.Ajax()
            .Select("_SelectIndex", "Chamber")
            .Insert("_InsertAjaxEditing", "Chamber")
            .Update("_SaveAjaxEditing", "Chamber")
            .Delete("_DeleteAjaxEditing", "Chamber");
        })
            .Columns(columns =>
            {
                columns.Bound(item => item.ChamberStructure).Width(100);
                columns.Bound(item => item.ChamberStructureDesc).Width(100);
                columns.Bound(item => item.PostDesc).Width(100);
                columns.Bound(item => item.ChamberFloorQuantity).Width(100);
                columns.Bound(item => item.ChamberDesc).Width(100);
                columns.Bound(item => item.ChamberStorey).Width(100);
                columns.Bound(item => item.ChamberSize).Width(100);
                columns.Bound(item => item.ChamberArea).Width(100);
               
                columns.Command(commands =>
                {
                    commands.Edit();
                    commands.Delete();
                }).Title("操作").Width(200);
            }).Resizable(r => r.Columns(true))
            .Editable(editing => editing.Mode(GridEditMode.PopUp))
            .Pageable(paging => paging.Style(GridPagerStyles.Status).PageOnScroll(true))
            .Scrollable(c => c.Height("570px"))
    .Resizable(resizing => resizing.Columns(true))
            .Sortable()
        )
<script type="text/javascript">

    function onEdit(e) {

    }


</script>
